package F.Demo;


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Administrator
 */
public class GetOutputsDemo {

    public static  void main(String[]args) throws IOException {
            
      InputStreamReader in2= new InputStreamReader(System.in);
      BufferedReader in3=new BufferedReader(in2);
      
      String[] items = {"衣","食","住","行","交际","爱好","其他"};
      float [] outputs = new float[7];
      float sum = 0;
      for(int i = 0; i < 7; i++){
          System.out.println("请输入——"+ items[i] + "——这项开支的数量：");
          outputs[i]=Float.parseFloat(in3.readLine());
          sum +=outputs[i];
          System.out.println();
      }
      System.out.println("当天各项开支如下：");
      for (int i = 0; i < 7; i++){
          System.out.println(items[i] +":" +outputs[i]);
      }
      System.out.println("当天各项开支总和："+ sum);
    }

}